package com.cn.hangyun.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cn.hangyun.common.CustomerContextHolder;
import com.cn.hangyun.dao.AisMapper;
import com.cn.hangyun.model.Ais;
import com.cn.hangyun.service.IAisService;
@Service("aisService")
public class AisServiceImpl implements IAisService {

	private AisMapper aisMapper;
	
	public AisMapper getAisMapper() {
		return aisMapper;
	}
	@Autowired
	public void setAisMapper(AisMapper aisMapper) {
		this.aisMapper = aisMapper;
	}
	@Override
	public List<Ais> getPageData(Ais rec) {
		CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_PG);
		return aisMapper.getPageData(rec);
	}
	@Override
	public long getRecordTotal(Ais rec) {
		CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_PG);
		return aisMapper.getRecordTotal(rec);
	}
	@Override
	public List<Ais> download(Ais rec) {
		CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_PG);
		return aisMapper.download(rec);
	}

}
